import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'
/**
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: ['admin','editor']    control the page roles (you can set multiple roles)
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
  }
 */

/**
 * constantRoutes
 * a base page that does not have permission requirements
 * all roles can be accessed
 */
export const constantRoutes = [
    {
        path: '/',
        component: Layout,
        redirect: '/main',
        children: [
            {
                path: 'main',
                component: () => import('@/views/main/main'),
                name: 'Main',
                meta: {title: '首页'}
            }
        ]
    },

    // {
    //     path: '/user-manage',
    //     component: Layout,
    //     redirect: {
    //         name: 'User-manage'
    //     },
    //     meta: {
    //         title: '用户管理',
    //         icon: 'dashboard'
    //     },
    //     children: [
    //         {
    //             path: 'user-manage',
    //             component: () => import('@/views/user-manage/user-manage'),
    //             name: 'User-manage',
    //             meta: {title: '用户管理'}
    //         },
    //     ]
    // },

    // {
    //     path: '/activity-manage',
    //     component: Layout,
    //     redirect: {
    //         name: 'Activity-manage'
    //     },
    //     meta: {
    //         title: '公益活动管理',
    //         icon: 'dashboard'
    //     },
    //     children: [
    //         {
    //             path: 'activity-manage',
    //             component: () => import('@/views/activity-manage/activity-manage'),
    //             name: 'Activity-manage',
    //             meta: {title: '公益活动管理'}
    //         }
    //     ]
    // },
    // {
    //     path: '/community-manage',
    //     component: Layout,
    //     redirect: {
    //         name: 'Community-manage'
    //     },
    //     meta: {
    //         title: '社区管理',
    //         icon: 'dashboard'
    //     },
    //     children: [
    //         {
    //             path: 'community-manage',
    //             component: () => import('@/views/community-manage/community-manage'),
    //             name: 'Community-manage',
    //             meta: {title: '社区管理'}
    //         }
    //     ]
    // },
    {
        path: '/goods_manage',
        component: Layout,
        redirect:{
			name:'goods_manage',
		},
        meta: {
            title: '商品管理',
            icon: 'dashboard'
        },
        children: [
            {
                path: 'goods_manage',
                component: () => import('@/views/goods/goods-manage'),
                name: 'goods_manage',
                meta: {title: '商品列表'}
            },
            {
                path: 'modify-goods',
                component: () => import('@/views/goods/modify-goods'),
                name: 'Modify-goods',
                hidden: true,
                meta: { title: '修改商品'}
            },
            {
                path: 'add-goods',
                component: () => import('@/views/goods/add-goods'),
                name: 'Add-goods',
                hidden: true,
                meta: { title: '添加商品'}
            },
            // {
            //     path: 'factory-list',
            //     component: () => import('@/views/goods/factoryList'),
            //     name: 'factoryList',
            //     meta: {title: '厂家列表'},
            //     hidden: true,
            // },
            // {
            //     path: 'factory-goods-list',
            //     component: () => import('@/views/goods/factoryGoodsList'),
            //     name: 'factoryGoodsList',
            //     meta: {title: '厂家商品列表'},
            //     hidden: true
            // },
            // {
            //     path: 'factory-shopping-car',
            //     component: () => import('@/views/goods/shoppingCar'),
            //     name: 'factoryShoppingCar',
            //     meta: {title: '购物车'},
            //     hidden: true
            // },
        ]
    },


    // {
    //     path: '/permission',
    //     component: Layout,
    //     redirect: '/permission/permission',
    //     name: 'permission',
    //     meta: {
    //         title: '权限管理',
    //         icon: 'dashboard'
    //     },
    //     children: [
    //         {
    //             path: 'permission-user',
    //             component: () => import('@/views/permission/user'),
    //             name: 'permissionUser',
    //             meta: {title: '管理员管理'}
    //         },
    //         {
    //             path: 'permission-addUser',
    //             component: () => import('@/views/permission/addUser'),
    //             name: 'permissionAddUser',
    //             meta: {title: '添加管理员'},
    //             hidden: true,
    //         },
    //         {
    //             path: 'permission-updateUser',
    //             component: () => import('@/views/permission/updateUser'),
    //             name: 'permissionUpdateUser',
    //             meta: {title: '修改管理员信息'},
    //             hidden: true,
    //         },
    //         {
    //             path: 'permission-roles',
    //             component: () => import('@/views/permission/roles'),
    //             name: 'permissionRoles',
    //             meta: {title: '角色管理'}
    //         },
    //         {
    //             path: 'permission-roles-add',
    //             component: () => import('@/views/permission/addRoles'),
    //             name: 'permissionAddRoles',
    //             meta: {title: '添加角色'},
    //             hidden: true,
    //         },
    //         {
    //             path: 'permission-roles-update',
    //             component: () => import('@/views/permission/updateRoles'),
    //             name: 'permissionUpdateRoles',
    //             meta: {title: '修改角色'},
    //             hidden: true,
    //         },
    //         {
    //             path: 'permission-permission',
    //             component: () => import('@/views/permission/permission'),
    //             name: 'permissionList',
    //             meta: {title: '权限管理'}
    //         },
    //         {
    //             path: 'permission-permission-add',
    //             component: () => import('@/views/permission/addPermission'),
    //             name: 'permissionAdd',
    //             hidden: true,
    //             meta: {title: '添加权限'}
    //         },
    //         {
    //             path: 'permission-permission-update',
    //             component: () => import('@/views/permission/updatePermission'),
    //             name: 'permissionUpdate',
    //             hidden: true,
    //             meta: {title: '修改权限'}
    //         },
    //         {
    //             path: 'permission-node',
    //             component: () => import('@/views/permission/node'),
    //             name: 'permissionNode',
    //             meta: {title: '节点管理'}
    //         },
    //         {
    //             path: 'permission-node-add',
    //             component: () => import('@/views/permission/addNode'),
    //             name: 'nodeAdd',
    //             hidden: true,
    //             meta: {title: '添加节点'}
    //         },
    //         {
    //             path: 'permission-node-update',
    //             component: () => import('@/views/permission/updateNode'),
    //             name: 'nodeUpdate',
    //             hidden: true,
    //             meta: {title: '添加节点'}
    //         },
    //     ]
    // },



    // {
    //     path: '/agent',
    //     component: Layout,
    //     redirect: '/agent/agent',
    //     name: 'agent',
    //     meta: {
    //         title: '代理',
    //         icon: 'user'
    //     },
    //     children: [
    //         {
    //             path: 'agent-apply-list',
    //             component: () => import('@/views/agent/applyList'),
    //             name: 'agentApplyList',
    //             meta: {title: '申请代理'}
    //         },
    //         {
    //             path: 'agent-apply',
    //             component: () => import('@/views/agent/apply'),
    //             name: 'agentApply',
    //             meta: {title: '填写申请资料'},
    //             hidden: true
    //         },
    //     ]
    // },

    {
        path: '/merchant-manage',
        component: Layout,
        redirect: {
            name: 'Merchant-manage'
        },
        meta: {
            title: '商户管理',
            icon: 'dashboard',
            roles: ['admin']
        },
        children: [
            {
                path: 'merchant_manage',
                component: () => import('@/views/merchant-manage/merchant-manage'),
                name: 'Merchant-manage',
                meta: {title: '商户列表', breadcrumb: false}
            },
            {
                path: 'read_merchant',
                component: () => import('@/views/merchant-manage/read-merchant'),
                name: 'Read-read_merchant',
                meta: {title: '商户信息' },
                hidden: true
            },
            {
                path: 'edit-merchant',
                hidden: true,
                component: () => import('@/views/merchant-manage/edit-merchant'),
                name: 'Edit-merchant',
                meta: {title: '编辑商户'}
            },
            {
                path: 'add-merchant',
                component: () => import('@/views/merchant-manage/add-merchant'),
                name: 'Add-merchant',
                meta: {title: '添加商户'}
            },
        ]
    },
    {
        path: '/order',
        component: Layout,
        redirect: '/order/order',
        name: 'order',
        meta: {
            title: '订单管理',
            icon: 'dashboard',
            roles: ['store']
        },
        children: [
            {
                path: 'order-enter',
                name: 'orderEnter',
                component: () => import('@/views/order/enterOrder'),
                meta: {title: '订货单管理'},
                hidden: true,
            },
            {
                path: 'order-out',
                name: 'orderOut',
                component: () => import('@/views/order/outOrder'),
                meta: {title: '发货单订单'},
                hidden: true,
            },
            {
                path: 'order-info',
                name: 'orderInfo',
                component: () => import('@/views/order/orderInfo'),
                meta: {title: '订单详情'},
                hidden: true
            },
            {
                path: 'order-book',
                name: 'orderBook',
                component: () => import('@/views/order/bookOrder'),
                meta: {
                    title: '预定信息管理'
                }
            },
            {
                path: 'order-book-info',
                name: 'orderBookInfo',
                component: () => import('@/views/order/bookOrderInfo'),
                meta: {
                    title: '预定信息详情'
                },
                hidden: true
            },
            {
                path: 'order-mall',
                name: 'orderMall',
                component: () => import('@/views/order/orderMall'),
                meta: {
                    title: '商城订单'
                }
            },
        ]
    },
    {
        path: '/class',
        component: Layout,
        redirect: '/class/class',
        name: 'class',
        meta: {
            title: '分类管理',
            icon: 'dashboard',
            roles: ['admin']
        },
        children: [
            {
                path: 'class-merchant',
                component: () => import('@/views/class/classMerchant'),
                name: 'classMerchant',
                meta: {title: '商户分类'}
            },
            {
                path: 'class-goods',
                component: () => import('@/views/class/goodsMerchant'),
                name: 'goodsMerchant',
                meta: { title: '商品分类'}
            },
            {
                path: 'class-goods-add',
                component: () => import('@/views/class/addGoodsClass'),
                name: 'addGoodsMerchant',
                meta: { title: '添加商品分类'},
                hidden: true
            },
            {
                path: 'class-goods-update',
                component: () => import('@/views/class/updateGoodsClass'),
                name: 'updateGoodsMerchant',
                meta: { title: '修改商品分类'},
                hidden: true
            },
        ]

    },
    {
        path: '/setting',
        component: Layout,
        redirect: '/setting/setting',
        name: 'setting',
        meta: {
            title: '设置',
            icon: 'user',
            roles: ['admin','store']
        },
        children: [
            // {
            //     path: 'setting-basic',
            //     component: () => import('@/views/setting/basic'),
            //     name: 'settingBasic',
            //     meta: {title: '基本信息'},
            //     hidden: true,
            // },
            // {
            //     path: 'setting-certification',
            //     component: () => import('@/views/setting/certification'),
            //     name: 'certification',
            //     meta: {title: '账号认证'},
            //     hidden: true,
            // },
            // {
            //     path: 'setting-await',
            //     component: () => import('@/views/setting/await'),
            //     name: 'setting-await',
            //     meta: {title: '等待审核'},
            //     hidden: true
            // },
            {
                path: 'setting-seat',
                component: () => import('@/views/setting/seat'),
                name: 'settingSeat',
                meta: {title: '座位设置', roles: ['store']},
            },
            {
                path: 'setting-tags',
                component: () => import('@/views/setting/tags'),
                name: 'settingTags',
                meta: {title: '标签设置', roles: ['admin']},
            },
            {
                path: 'setting-devices',
                component: () => import('@/views/setting/devices'),
                name: 'settingDevices',
                meta: {title: '服务设置', roles: ['admin']},
            },
            {
                path: 'setting-coupons',
                component: () => import('@/views/setting/coupons'),
                name: 'settingCoupons',
                meta: {title: '优惠券设置', roles: ['store']}
            },
            {
                path: 'setting-activity',
                component: () => import('@/views/setting/activity'),
                name: 'settingActivity',
                meta: {title: '活动设置', roles: ['store']}
            },
            {
                path: 'setting-user',
                component: () => import('@/views/setting/userInfo'),
                name: 'settingUserInfo',
                meta: {title: '账号设置', roles: ['store']}
            },
            {
                path: 'setting-user-review',
                component: () => import('@/views/setting/review'),
                name: 'settingReview',
                meta: {title: '审核中', roles: ['store']},
                hidden: true
            },
            {
                path: 'setting-account',
                component: () => import('@/views/setting/account'),
                name: 'settingAccount',
                meta: {title: '账号设置', roles: ['store']},
                hidden: true
            },
            {
                path: 'setting-banner',
                component: () => import('@/views/setting/banner'),
                name: 'settingBanner',
                meta: {title: '轮播图设置', roles: ['admin']}
            },
            {
                path: 'setting-merchant-tags',
                component: () => import('@/views/setting/merchantTags'),
                name: 'settingMerchantTags',
                meta: {title: '商户标签设置', roles: ['admin']}
            }
        ]
    },
    // {
    //     path: '/financial-manage',
    //     component: Layout,
    //     redirect: {
    //         name: 'Financial-manage'
    //     },
    //     meta: {
    //         title: '财务管理',
    //         icon: 'dashboard',
    //         roles: ['admin','super_editor']
    //     },
    //     children: [
    //         {
    //             path: 'financial-manage',
    //             component: () => import('@/views/financial-manage/financial-manage'),
    //             name: 'Financial-manage',
    //             meta: {
    //                 title: '财务管理',
    //                 roles: ['admin']
    //             }
    //         }
    //     ]
    // },
    // {
    //     path: '/check',
    //     component: Layout,
    //     redirect: '/check/check',
    //     name: 'check',
    //     meta: {
    //         title: '审核管理',
    //         icon: 'user',
    //         roles: ['admin']
    //     },
    //     children: [
    //         {
    //             path: 'check-prove',
    //             component: () => import('@/views/check/prove'),
    //             name: 'checkProve',
    //             meta: {title: '认证审核'}
    //         },
    //         {
    //             path: 'check-prove-Info',
    //             component: () => import('@/views/check/proveInfo'),
    //             name: 'checkProveInfo',
    //             meta: {title: '认证资料'},
    //             hidden: true
    //         },
    //         {
    //             path: 'check-agent',
    //             name: 'checkAgent',
    //             component: () => import('@/views/check/agent'),
    //             meta: {title: '代理审核'}
    //         },
    //         {
    //             path: 'check-agent-info',
    //             name: 'checkAgentInfo',
    //             component: () => import('@/views/check/agentInfo'),
    //             meta: {title: '代理资料'},
    //             hidden: true
    //         },
    //         {
    //             path: 'check-order',
    //             name: 'checkOrder',
    //             component: () => import('@/views/check/order'),
    //             meta: {title: '入库订单审核'},
    //         },
    //     ]
    // },





    {
        path: '/login',
        component: () => import('@/views/login/index'),
        hidden: true
    },
    {
        path: '/login/agent',
        component: () => import('@/views/login/agentLogin'),
        hidden: true
    },
    {
        path: '/login/store',
        component: () => import('@/views/login/store'),
        hidden: true
    },
    {
        path: '/register/index',
        component: () => import('@/views/register/index'),
        hidden: true
    },
    {
        path: '/404',
        component: () => import('@/views/404'),
        hidden: true
    }


    // 404 page must be placed at the end !!!

]

const createRouter = () => new Router({
    // mode: 'history', // require service support
    scrollBehavior: () => ({y: 0}),
    routes: constantRoutes
})

export const asyncRoutes = [
    // {
    //     path: '/merchant-manage',
    //     component: Layout,
    //     redirect: {
    //         name: 'Merchant-manage'
    //     },
    //     meta: {
    //         title: '商户管理',
    //         icon: 'dashboard',
    //         roles: ['admin']
    //     },
    //     children: [
    //         {
    //             path: 'merchant_manage',
    //             component: () => import('@/views/merchant-manage/merchant-manage'),
    //             name: 'Merchant-manage',
    //             meta: {title: '商户列表', breadcrumb: false}
    //         },
    //         {
    //             path: 'read_merchant',
    //             component: () => import('@/views/merchant-manage/read-merchant'),
    //             name: 'Read-read_merchant',
    //             meta: {title: '商户信息' },
    //             hidden: true
    //         },
    //         {
    //             path: 'edit-merchant',
    //             hidden: true,
    //             component: () => import('@/views/merchant-manage/edit-merchant'),
    //             name: 'Edit-merchant',
    //             meta: {title: '编辑商户'}
    //         },
    //         {
    //             path: 'add-merchant',
    //             component: () => import('@/views/merchant-manage/add-merchant'),
    //             name: 'Add-merchant',
    //             meta: {title: '添加商户'}
    //         },
    //     ]
    // },
    // {
    //     path: '/order',
    //     component: Layout,
    //     redirect: '/order/order',
    //     name: 'order',
    //     meta: {
    //         title: '订单管理',
    //         icon: 'dashboard',
    //         roles: ['store']
    //     },
    //     children: [
    //         {
    //             path: 'order-enter',
    //             name: 'orderEnter',
    //             component: () => import('@/views/order/enterOrder'),
    //             meta: {title: '订货单管理'},
    //             hidden: true,
    //         },
    //         {
    //             path: 'order-out',
    //             name: 'orderOut',
    //             component: () => import('@/views/order/outOrder'),
    //             meta: {title: '发货单订单'},
    //             hidden: true,
    //         },
    //         {
    //             path: 'order-info',
    //             name: 'orderInfo',
    //             component: () => import('@/views/order/orderInfo'),
    //             meta: {title: '订单详情'},
    //             hidden: true
    //         },
    //         {
    //             path: 'order-book',
    //             name: 'orderBook',
    //             component: () => import('@/views/order/bookOrder'),
    //             meta: {
    //                 title: '预定信息管理'
    //             }
    //         },
    //         {
    //             path: 'order-book-info',
    //             name: 'orderBookInfo',
    //             component: () => import('@/views/order/bookOrderInfo'),
    //             meta: {
    //                 title: '预定信息详情'
    //             },
    //             hidden: true
    //         },
    //         {
    //             path: 'order-mall',
    //             name: 'orderMall',
    //             component: () => import('@/views/order/orderMall'),
    //             meta: {
    //                 title: '商城订单'
    //             }
    //         },
    //     ]
    // },
    // {
    //     path: '/class',
    //     component: Layout,
    //     redirect: '/class/class',
    //     name: 'class',
    //     meta: {
    //         title: '分类管理',
    //         icon: 'dashboard',
    //         roles: ['admin']
    //     },
    //     children: [
    //         {
    //             path: 'class-merchant',
    //             component: () => import('@/views/class/classMerchant'),
    //             name: 'classMerchant',
    //             meta: {title: '商户分类'}
    //         },
    //         {
    //             path: 'class-goods',
    //             component: () => import('@/views/class/goodsMerchant'),
    //             name: 'goodsMerchant',
    //             meta: { title: '商品分类'}
    //         },
    //         {
    //             path: 'class-goods-add',
    //             component: () => import('@/views/class/addGoodsClass'),
    //             name: 'addGoodsMerchant',
    //             meta: { title: '添加商品分类'},
    //             hidden: true
    //         },
    //         {
    //             path: 'class-goods-update',
    //             component: () => import('@/views/class/updateGoodsClass'),
    //             name: 'updateGoodsMerchant',
    //             meta: { title: '修改商品分类'},
    //             hidden: true
    //         },
    //     ]
    //
    // },
    // {
    //     path: '/setting',
    //     component: Layout,
    //     redirect: '/setting/setting',
    //     name: 'setting',
    //     meta: {
    //         title: '设置',
    //         icon: 'user',
    //         roles: ['admin','store']
    //     },
    //     children: [
    //         // {
    //         //     path: 'setting-basic',
    //         //     component: () => import('@/views/setting/basic'),
    //         //     name: 'settingBasic',
    //         //     meta: {title: '基本信息'},
    //         //     hidden: true,
    //         // },
    //         // {
    //         //     path: 'setting-certification',
    //         //     component: () => import('@/views/setting/certification'),
    //         //     name: 'certification',
    //         //     meta: {title: '账号认证'},
    //         //     hidden: true,
    //         // },
    //         // {
    //         //     path: 'setting-await',
    //         //     component: () => import('@/views/setting/await'),
    //         //     name: 'setting-await',
    //         //     meta: {title: '等待审核'},
    //         //     hidden: true
    //         // },
    //         {
    //             path: 'setting-seat',
    //             component: () => import('@/views/setting/seat'),
    //             name: 'settingSeat',
    //             meta: {title: '座位设置', roles: ['store']},
    //         },
    //         {
    //             path: 'setting-tags',
    //             component: () => import('@/views/setting/tags'),
    //             name: 'settingTags',
    //             meta: {title: '标签设置', roles: ['admin']},
    //         },
    //         {
    //             path: 'setting-devices',
    //             component: () => import('@/views/setting/devices'),
    //             name: 'settingDevices',
    //             meta: {title: '服务设置', roles: ['admin']},
    //         },
    //         {
    //             path: 'setting-coupons',
    //             component: () => import('@/views/setting/coupons'),
    //             name: 'settingCoupons',
    //             meta: {title: '优惠券设置', roles: ['store']}
    //         },
    //         {
    //             path: 'setting-activity',
    //             component: () => import('@/views/setting/activity'),
    //             name: 'settingActivity',
    //             meta: {title: '活动设置', roles: ['store']}
    //         },
    //         {
    //             path: 'setting-user',
    //             component: () => import('@/views/setting/userInfo'),
    //             name: 'settingUserInfo',
    //             meta: {title: '账号设置', roles: ['store']}
    //         },
    //         {
    //             path: 'setting-user-review',
    //             component: () => import('@/views/setting/review'),
    //             name: 'settingReview',
    //             meta: {title: '审核中', roles: ['store']},
    //             hidden: true
    //         },
    //         {
    //             path: 'setting-account',
    //             component: () => import('@/views/setting/account'),
    //             name: 'settingAccount',
    //             meta: {title: '账号设置', roles: ['store']},
    //             hidden: true
    //         },
    //         {
    //             path: 'setting-banner',
    //             component: () => import('@/views/setting/banner'),
    //             name: 'settingBanner',
    //             meta: {title: '轮播图设置', roles: ['admin']}
    //         },
    //         {
    //             path: 'setting-merchant-tags',
    //             component: () => import('@/views/setting/merchantTags'),
    //             name: 'settingMerchantTags',
    //             meta: {title: '商户标签设置', roles: ['admin']}
    //         }
    //     ]
    // },
    // // {
    // //     path: '/financial-manage',
    // //     component: Layout,
    // //     redirect: {
    // //         name: 'Financial-manage'
    // //     },
    // //     meta: {
    // //         title: '财务管理',
    // //         icon: 'dashboard',
    // //         roles: ['admin','super_editor']
    // //     },
    // //     children: [
    // //         {
    // //             path: 'financial-manage',
    // //             component: () => import('@/views/financial-manage/financial-manage'),
    // //             name: 'Financial-manage',
    // //             meta: {
    // //                 title: '财务管理',
    // //                 roles: ['admin']
    // //             }
    // //         }
    // //     ]
    // // },
    // // {
    // //     path: '/check',
    // //     component: Layout,
    // //     redirect: '/check/check',
    // //     name: 'check',
    // //     meta: {
    // //         title: '审核管理',
    // //         icon: 'user',
    // //         roles: ['admin']
    // //     },
    // //     children: [
    // //         {
    // //             path: 'check-prove',
    // //             component: () => import('@/views/check/prove'),
    // //             name: 'checkProve',
    // //             meta: {title: '认证审核'}
    // //         },
    // //         {
    // //             path: 'check-prove-Info',
    // //             component: () => import('@/views/check/proveInfo'),
    // //             name: 'checkProveInfo',
    // //             meta: {title: '认证资料'},
    // //             hidden: true
    // //         },
    // //         {
    // //             path: 'check-agent',
    // //             name: 'checkAgent',
    // //             component: () => import('@/views/check/agent'),
    // //             meta: {title: '代理审核'}
    // //         },
    // //         {
    // //             path: 'check-agent-info',
    // //             name: 'checkAgentInfo',
    // //             component: () => import('@/views/check/agentInfo'),
    // //             meta: {title: '代理资料'},
    // //             hidden: true
    // //         },
    // //         {
    // //             path: 'check-order',
    // //             name: 'checkOrder',
    // //             component: () => import('@/views/check/order'),
    // //             meta: {title: '入库订单审核'},
    // //         },
    // //     ]
    // // },
    //
    // {path: '*', redirect: '/404', hidden: true}
];

const router = createRouter()

// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
    // const newRouter = createRouter()
    router.matcher = createRouter().matcher // reset router
}

export default router
